unlessM (stillpresent db oldkey) $
logChange oldkey (Remote.uuid remote) InfoMissing
_ -> noop
- db <- Export.openDb (Remote.uuid remote)
- forM_ (exportedTreeishes oldexport) $ \oldtree ->
- Export.runExportDiffUpdater updater db oldtree finaltree
- Export.closeDb db
+ -- When the remote is versioned, it still contains keys
+ -- that are not present in the new tree.
+ unless (Remote.versionedExport (Remote.exportActions remote)) $ do
+ db <- Export.openDb (Remote.uuid remote)
+ forM_ (exportedTreeishes oldexport) $ \oldtree ->
+ Export.runExportDiffUpdater updater db oldtree finaltree
+ Export.closeDb db
buildImportCommit' :: Remote -> ImportCommitConfig -> Maybe Sha -> History Sha -> Annex (Maybe Sha)
buildImportCommit' remote importcommitconfig mtrackingcommit imported@(History ti _) =
do not operate on a repository that has an empty name.
* move: Fix openFile crash with -J
(Fixes a reversion in 8.20201103)
- * S3: Speed up importing from a large bucket when fileprefix= is set
+ * S3: Speed up importing from a large bucket when fileprefix= is set,
by only asking for files under the prefix.
+ * When importing from versioned remotes, fix tracking of the content
+ of deleted files.
-- Joey Hess <id@joeyh.name> Mon, 03 Oct 2022 13:36:42 -0400
removeExportedLocation db ek loc
flushDbQueue db
- -- An versionedExport remote supports removeExportLocation to remove
+ -- A versionedExport remote supports removeExportLocation to remove
-- the file from the exported tree, but still retains the content
-- and allows retrieving it.
unless (versionedExport (exportActions r)) $ do
-- Can throw exception if unable to access remote, or if remote
-- refuses to remove the content.
, removeExport :: Key -> ExportLocation -> a ()
- -- Set when the content of a Key stored in the remote to an
- -- ExportLocation and then removed with removeExport remains
- -- accessible to retrieveKeyFile and checkPresent.
+ -- Set when the remote is versioned, so once a Key is stored
+ -- to an ExportLocation, a subsequent deletion of that
+ -- ExportLocation leaves the key still accessible to retrieveKeyFile
+ -- and checkPresent.
, versionedExport :: Bool
-- Removes an exported directory. Typically the directory will be
-- empty, but it could possibly contain files or other directories,
Lots. I love git-annex.
+> [[fixed|done]] --[[Joey]]
--- /dev/null
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2022-10-11T16:28:39Z"
+ content="""
+This looks like a simple fix. After importing from a versioned remote,
+it can just skip updating the location logs to remove the keys that are not
+present in the current tree. The same as is already done when exporting
+to a versioned remote. I've made that change.
+"""]]
Indicates that `IMPORTKEY` can be used.
* `IMPORTKEYSUPPORTED-FAILURE`
Indicates that `IMPORTKEY` cannot be used.
+ * `VERSIONED`
+ Used to check if the special remote is versioned.
+ Note that this request may be made before or after `PREPARE`.
+ * `ISVERSIONED`
+ Indicates that the remote is versioned.
+ * `NOTVERSIONED`
+ Indicates that the remote is not versioned.
* `LISTIMPORTABLECONTENTS`
Used to get a list of all the files that are stored in the special
remote. A block of responses
be nested multiple levels deep.
This should only be used when the remote supports using
"TRANSFER RECEIVE Key" to retrieve historical versions of files.
+ And, it should only be used when the remote replies `ISVERSIONED`
+ to the `VERSIONED` message.
* `END`
Indicates the end of a block of responses.
* `LOCATION Name`